/*
 * stock.h
 *
 *  Created on: Jun 22, 2012
 *      Author: cdunbar
 */

#ifndef STOCK_H_
#define STOCK_H_

#include <list>

class Stock {
public:
	Stock(char* symbol);
	virtual ~Stock();

	//Accessors
	double get_deviation_chance() {return deviation_chance_;}
	double get_current_average() { return current_average_;}
	double get_current_price() { return current_price_;}
	void set_deviation_chance(double deviation_chance) {deviation_chance_ = deviation_chance;}
	void set_current_average(double current_average) {current_average_ = current_average;}

	void set_current_price(double current_price, int average_across);
	bool should_purchase();

private:

	std::list<double> recent_prices_;
	std::list<double>::iterator prices_it_;
	char* symbol_;
	double deviation_chance_;
	double current_average_;
	double current_price_;

};

#endif /* STOCK_H_ */
